<template>
  <component :is="component" ref="item" :data-id="dataId" />
</template>

<script>
import QueryList from './list/index.vue'
import Column from './column/index.vue'
import { shallowRef } from 'vue'
export default {
  name: 'Index',
  components: { QueryList, Column },

  data() {
    return {
      component: shallowRef(QueryList),
      dataId: null
    }
  },
  methods: {
    openList() {
      this.component = shallowRef(QueryList)
    },
    openColumn(id) {
      this.dataId = id
      this.component = shallowRef(Column)
    }
  }
}
</script>

<style lang="less" scoped></style>
